package com.nsn.das.midas.model.mml.data;

import java.util.Date;
import java.util.List;

import javax.net.ssl.SSLEngineResult.Status;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.nsn.das.midas.model.component.RevisionHistory;
import com.nsn.das.midas.model.user.DASUser;
/*
 * unchecked fields:CODAdmin10_ML
 * */

@Entity
@Table(name = "mml_command_data")
public class MMLCommandData extends MMLData{
	@Column(unique=true)
	private String letter;//CODLetter
	private String mmlName;//CODMMLID
	private String menuText;//CODEnMenuText
	private Status status;//CODStatus
	private boolean interactive;//CODAdmin1
	private boolean switchoverAllowed = true;//CODAdmin2
	private boolean executionAllowedInTest = true;//CODAdmin3
	private boolean logPrintDone = true;//CODAdmin4
	private String priority;//CODAdmin5
	private boolean reportedToSecurityReporting;//CODAdmin7
	private boolean reportedToMonitoring;//CODAdmin11
	private String authorityRequirement;//CODAdmin9
	@Column(length=2)
	private String preventing;//CODAdmin10
	private boolean availability;//CODAdmin6
	private boolean exectionCounter;//CODAdmin8
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="author_id")
	private DASUser author;//CODAuthor
	private Date createdAt;//CODDate
	@OneToMany(fetch=FetchType.LAZY)
	private List<RevisionHistory> histories;//Comments,RevisionHistoryComments
	
	public String getLetter() {
		return letter;
	}
	
	public void setLetter(String letter) {
		this.letter = letter;
	}

	public String getMmlName() {
		return mmlName;
	}

	public void setMmlName(String mmlName) {
		this.mmlName = mmlName;
	}

	public String getMenuText() {
		return menuText;
	}

	public void setMenuText(String menuText) {
		this.menuText = menuText;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public boolean isInteractive() {
		return interactive;
	}

	public void setInteractive(boolean interactive) {
		this.interactive = interactive;
	}

	public boolean isSwitchoverAllowed() {
		return switchoverAllowed;
	}

	public void setSwitchoverAllowed(boolean switchoverAllowed) {
		this.switchoverAllowed = switchoverAllowed;
	}

	public boolean isExecutionAllowedInTest() {
		return executionAllowedInTest;
	}

	public void setExecutionAllowedInTest(boolean executionAllowedInTest) {
		this.executionAllowedInTest = executionAllowedInTest;
	}

	public boolean isLogPrintDone() {
		return logPrintDone;
	}

	public void setLogPrintDone(boolean logPrintDone) {
		this.logPrintDone = logPrintDone;
	}

	public String getPriority() {
		return priority;
	}

	public void setPriority(String priority) {
		this.priority = priority;
	}

	public boolean isReportedToSecurityReporting() {
		return reportedToSecurityReporting;
	}

	public void setReportedToSecurityReporting(boolean reportedToSecurityReporting) {
		this.reportedToSecurityReporting = reportedToSecurityReporting;
	}

	public boolean isReportedToMonitoring() {
		return reportedToMonitoring;
	}

	public void setReportedToMonitoring(boolean reportedToMonitoring) {
		this.reportedToMonitoring = reportedToMonitoring;
	}

	public String getAuthorityRequirement() {
		return authorityRequirement;
	}

	public void setAuthorityRequirement(String authorityRequirement) {
		this.authorityRequirement = authorityRequirement;
	}

	public String getPreventing() {
		return preventing;
	}

	public void setPreventing(String preventing) {
		this.preventing = preventing;
	}

	public DASUser getAuthor() {
		return author;
	}

	public void setAuthor(DASUser author) {
		this.author = author;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public List<RevisionHistory> getHistories() {
		return histories;
	}

	public void setHistories(List<RevisionHistory> histories) {
		this.histories = histories;
	}

	public boolean isAvailability() {
		return availability;
	}

	public void setAvailability(boolean availability) {
		this.availability = availability;
	}

	public boolean isExectionCounter() {
		return exectionCounter;
	}

	public void setExectionCounter(boolean exectionCounter) {
		this.exectionCounter = exectionCounter;
	}
	
}
